package com.swiftride.fallback;

import com.swiftride.feign.TencentDistanceFeign;
import com.swiftride.param.TencentDistanceParam;
import com.swiftride.result.R;
import org.springframework.cloud.openfeign.FallbackFactory;

public class TencentDistanceFeignFallbackFactory implements FallbackFactory<TencentDistanceFeign> {
    @Override
    public TencentDistanceFeign create(Throwable cause) {
        return new TencentDistanceFeign() {
            @Override
            public Object calculateDistance(TencentDistanceParam tencentDistanceParam) {
                return R.error();
            }
        };
    }
}
